﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonalTailor.aspx.cs" Inherits="Omabar.CMS.Mobile.PersonalTailor" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <link type="text/css" rel="stylesheet" href="css/index.css" />
    <link type="text/css" rel="stylesheet" href="css/bootstrap.min.css" />
    <link type="text/css" rel="stylesheet" href="css/bootstrap-theme.min.css" />
    <link type="text/css" rel="stylesheet" href="css/zzsc.css" media="screen" />

    <script src="js/jquery.min.js" type="text/javascript"></script>
    <script src="js/bootstrap.min.js" type="text/javascript"></script>
    <script src="js/zzsc.js" type="text/javascript"></script>
    <script src="js/jquery_jmodal.js"></script>
    <title>欧玛贝，来自德国，专注定制</title>

    <style type="text/css">
        select {
            width: 190px;
            height: 50px;
            border: 0;
            background: none;
            font-size: 1em;
        }
    </style>

    <script type="text/javascript">
        $(document).ready(function () {
            $("#bottomNav a").click(function () {
                $("#bottomNav a").removeClass("current");
                $(this).addClass("current");
            });

            $("#mainRegion").css("height", document.documentElement.clientHeight - 50 - $("#bottomNav").height());
        });

        function submitMyTrip() {
            if ($("#TELEPHONE").val() == "") {
                alert("手机号码不能为空");
                return;
            }
            if (!(/^1[3|4|5|8][0-9]\d{4,8}$/.test($("#TELEPHONE").val()))) {
                alert("手机号码不正确");
                return;
            }
            if (!(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/.test($("#EMAIL").val()))) {
                alert("邮箱格式不正确");
                return;
            }

            $.post("../Handler/CustomizedTravelAdd.ashx",
                {
                    DESTINATION: $("#DESTINATION").val(),
                    STARTCITY: $("#STARTCITY").val(),
                    TRAVELDAYS: $("#TRAVELDAYS").val(),
                    ADULT: $("#ADULT").val(),
                    CHILD: $("#CHILD").val(),
                    BUDGET: $("#BUDGET").val(),
                    STARTDATE: $("#STARTDATE").val(),
                    THEMES: $("#THEMES").val(),
                    HOBBYS: $("#HOBBYS").val(),
                    ADDITIONAL: $("#ADDITIONAL").val(),
                    USERNAME: $("#USERNAME").val(),
                    TELEPHONE: $("#TELEPHONE").val(),
                    EMAIL: $("#EMAIL").val()
                },
                function (data, status) {
                    if (data.Success)
                        alert("添加成功");
                    else alert("添加失败");

                    //console.log(data);
                    //var mtop = 300;
                    //if ((navigator.userAgent.indexOf('MSIE') >= 0) && (navigator.userAgent.indexOf('Opera') < 0)) {
                    //    mtop = 300;
                    //}
                    ////Messenger().post({ message: data.Tip, type: 'error' });
                    //$.fn.jmodal({
                    //    title: '提交成功',
                    //    content: '您的定制已提交成功，我们将在24小时之内与您联系。',
                    //    buttonText: { ok: '确定', cancel: '取消' },
                    //    marginTop: mtop,
                    //    okEvent: function (obj, args) {
                    //        $.fn.hideJmodal();
                    //        $("#USERNAME").val("");
                    //        $("#TELEPHONE").val("");
                    //        $("#EMAIL").val("");
                    //        //location.reload(true);
                    //    }
                    //});
                }, "json");
        }
    </script>
</head>
<body>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span12">
                <form id="form1" method="post" action="../Handler/CustomizedTravelAdd.ashx?isMobile=true">
                    <div class="logo title" style="height: 50px;">
                        <div class="floatL" style="width: 200px; height: 100%; line-height: 50px; font-size: 1.5em; padding-left: 10px;">私人定制</div>
                        <div class="floatR NavIcon">
                            <a href="SideBar.aspx">
                                <img src="images/TopNav.png" style="height: 43px; margin-bottom: 3px;" /></a>
                        </div>
                    </div>

                    <div id="mainRegion">
                        <div class="gridContainer paddingT20 font20"><span class="marginR10">您的需求</span><span class="fontcol33cc">▼</span></div>
                        <div class="gridContainer paddingT20 borderBottom"></div>
                        <div class="gridContainer paddingT20 paddingLR5">
                            <ul class="InfoInput">
                                <li><span class="MandatoryTips">*</span><span><input id="DESTINATION" name="DESTINATION" type="text" placeholder="目的地" /></span><span class="Prompt">&nbsp;</span></li>
                                <li><span class="MandatoryTips">*</span><span><input name="STARTCITY" id="STARTCITY" type="text" placeholder="始发地" /></span><span class="Prompt">&nbsp;</span></li>
                                <li><span class="MandatoryTips">&nbsp;</span><span><input name="TRAVELDAYS" id="TRAVELDAYS" type="text" placeholder="1" /></span><span class="Prompt">出行天数▼</span></li>
                                <li><span class="MandatoryTips">&nbsp;</span><span><input name="ADULT" id="ADULT" type="text" placeholder="1" /></span><span class="Prompt">成人人数▼</span></li>
                                <li><span class="MandatoryTips">&nbsp;</span><span><input name="CHILD" id="CHILD" type="text" placeholder="0" /></span><span class="Prompt">儿童人数▼</span></li>
                                <li><span class="MandatoryTips">&nbsp;</span><span><input name="BUDGET" id="BUDGET" type="text" placeholder="0" /></span><span class="Prompt">单人预算▼</span></li>
                                <li><span class="MandatoryTips">*</span><span><input name="STARTDATE" id="STARTDATE" type="text" placeholder="出行日期:(<%=DateTime.Now.ToString("yyyy-MM-dd") %>)" /></span><span class="Prompt"><img src="images/Icondate.png" width="24" height="24" alt="" /></span></li>
                            </ul>
                        </div>

                        <div class="gridContainer paddingT20 font20"><span class="marginR10">私人定制</span><span class="fontcol33cc">▼</span></div>
                        <div class="gridContainer paddingT20 borderBottom"></div>
                        <div class="gridContainer paddingT20 paddingLR5">
                            <ul class="InfoInput">
                                <li><span class="MandatoryTips">&nbsp;</span>
                                    <span>
                                        <select name="THEMES" id="THEMES" placeholder="亲子时光">
                                            <%foreach (var theme in themes)
                                                { %>
                                            <option value="<%=theme.THEME_ID%>"><%=theme.THEME_NAME%></option>
                                            <%}%>
                                        </select>

                                    </span><span class="Prompt">旅游主题▼</span></li>
                                <li><span class="MandatoryTips">&nbsp;</span><span><input id="HOBBYS" name="HOBBYS" type="text" placeholder="美食,摄影,运动,探险" /></span><span class="Prompt">兴趣爱好▼</span></li>
                                <li>
                                    <span class="marginL30 clear">
                                        <textarea name="ADDITIONAL" id="ADDITIONAL" placeholder="特殊要求"></textarea></span></li>
                            </ul>
                        </div>

                        <div class="gridContainer paddingT20 font20"><span class="marginR10">联系人</span><span class="fontcol33cc">▼</span></div>
                        <div class="gridContainer paddingT20 borderBottom"></div>
                        <div class="gridContainer paddingT20 paddingLR5">
                            <ul class="InfoInput">
                                <li><span class="MandatoryTips">*</span><span><input name="USERNAME" id="USERNAME" type="text" placeholder="姓名" /></span><span class="Prompt">&nbsp;</span></li>
                                <li><span class="MandatoryTips">*</span><span><input name="TELEPHONE" id="TELEPHONE" type="text" placeholder="手机" /></span><span class="Prompt">&nbsp;</span></li>
                                <li><span class="MandatoryTips">*</span><span><input name="EMAIL" id="EMAIL" type="text" placeholder="邮箱" /></span><span class="Prompt">&nbsp;</span></li>
                            </ul>
                        </div>

                        <div class="gridContainer paddingT20 borderBottom"></div>
                        <div class="gridContainer paddingT20 paddingLR5">
                            <ul class="InfoInput">
                                <li><a style="line-height: 40px; font-size: 1.5em; height: 40px;" href="javascript:submitMyTrip();">提交</a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="bottomNav" id="bottomNav" style="height:55px;">
                        <div class="Nav">
<div class="Nav"  >
                        <a href="Index.aspx" ><img src="images/N_1.png" style="width:50px; height:50px;margin-left:10px; margin-right:15px; margin-top:5px;" /></a>
                        <a href="RouteCategory.aspx" ><img src="images/N_2.png" style="width:50px; height:50px;margin-right:15px; margin-left:15px; margin-top:5px;" /></a>
                        <a href="PersonalTailor.aspx" ><img src="images/N_3_3.png" style="width:50px; height:50px;margin-right:15px; margin-left:15px; margin-top:5px;" /></a>
                        <a href="SpecialItemList.aspx" ><img src="images/N_4.png" style="width:50px; height:50px;margin-right:15px; margin-left:10px; margin-top:5px;" /></a>

                        </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</body>
</html>
